home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1995 November / Macworld Nov ’95.toast / Developers / Flex 2.5.2 / flex-2.5.2 / scan.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-06-30  |  51.7 KB  |  2,540 lines  |  [TEXT/MPS ]

  1. #line 2 "scan.c"
  2. /***
  3.  *
  4.  * A lexical scanner generated by flex
  5.  * CEH - flex.skl modified by Christopher E. Hyde, 95-06-29 from v2.85 95/04/24
  6.  *
  7.  ***/
  8.  
  9. #define FLEX_SCANNER
  10. #define YY_FLEX_MAJOR_VERSION 2
  11. #define YY_FLEX_MINOR_VERSION 5
  12.  
  13. #ifdef macintosh
  14. #pragma segment FlexScanner
  15. #endif
  16.  
  17. #include <stdio.h>
  18.  
  19. // cfront 1.2 defines "c_plusplus" instead of "__cplusplus"
  20. #if defined(c_plusplus) && !defined(__cplusplus)
  21. #define __cplusplus
  22. #endif
  23.  
  24. #define    YY_C
  25. #define    YY_DECLARE(t)    static t 
  26. #define    istream            FILE
  27.  
  28. #define YY_USE_PROTOS    // Use prototypes in function declarations.
  29. #define YY_USE_CONST    // The "const" storage-class-modifier is valid.
  30.  
  31. #ifdef __cplusplus
  32.  
  33. #include <stdlib.h>
  34. //#include <unistd.h>
  35.  
  36. #else    // ! __cplusplus
  37.  
  38. #if __STDC__
  39.  
  40. #endif    // __STDC__
  41. #endif    // ! __cplusplus
  42.  
  43. #ifdef YY_USE_CONST
  44. #define yyconst const
  45. #else
  46. #define yyconst
  47. #endif
  48.  
  49.  
  50. #ifdef YY_USE_PROTOS
  51. #define YY_PROTO(proto) proto
  52. #else
  53. #define YY_PROTO(proto) ()
  54. #endif
  55.  
  56. // Returned upon end-of-file.
  57. #define YY_NULL    0
  58.  
  59. /* Promotes a possibly negative, possibly signed char to an unsigned
  60.  * integer for use as an array index.  If the signed char is negative,
  61.  * we want to instead treat it as an 8-bit unsigned char, hence the
  62.  * double cast.
  63.  */
  64. #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
  65.  
  66. /* Enter a start condition.  This macro really ought to take a parameter,
  67.  * but we do it the disgusting crufty way forced on us by the ()-less
  68.  * definition of BEGIN.
  69.  */
  70. #define BEGIN yy_start = 1 + 2 *
  71.  
  72. /* Translate the current start state into a value that can be later handed
  73.  * to BEGIN to return to the state.  The YYSTATE alias is for lex
  74.  * compatibility.
  75.  */
  76. #define YY_START ((yy_start - 1) / 2)
  77. #define YYSTATE YY_START
  78.  
  79. // Action number for EOF rule of a given start state.
  80. #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
  81.  
  82. // Special action meaning "start processing a new file".
  83. #define YY_NEW_FILE yyrestart(yyin)
  84.  
  85. #define YY_END_OF_BUFFER_CHAR 0
  86.  
  87. // Size of default input buffer.
  88. #define YY_BUF_SIZE 16384
  89.  
  90. typedef struct yy_buffer_state* YY_BUFFER_STATE;
  91.  
  92. extern int yyleng;
  93. extern FILE *yyin, *yyout;
  94.  
  95. #define EOB_ACT_CONTINUE_SCAN    0
  96. #define EOB_ACT_END_OF_FILE        1
  97. #define EOB_ACT_LAST_MATCH        2
  98.  
  99. /* The funky do-while in the following #define is used to turn the definition
  100.  * int a single C statement (which needs a semi-colon terminator).  This
  101.  * avoids problems with code like:
  102.  *
  103.  *     if (condition_holds)
  104.  *        yyless(5);
  105.  *    else
  106.  *        do_something_else();
  107.  *
  108.  * Prior to using the do-while the compiler would get upset at the
  109.  * "else" because it interpreted the "if" statement as being all
  110.  * done when it reached the ';' after the yyless() call.
  111.  */
  112.  
  113. /* Return all but the first 'n' matched characters back to the input stream. */
  114.  
  115. #define yyless(n)    do { \
  116.         /* Undo effects of setting up yytext. */ \
  117.         *yy_cp = yy_hold_char; \
  118.         yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
  119.         YY_DO_BEFORE_ACTION; /* set up yytext again */ \
  120.     } while (0)
  121.  
  122. #define unput(c)    yyunput(c, yytext_ptr)
  123.  
  124. /* The following is because we cannot portably get our hands on size_t
  125.  * (without autoconf's help, which isn't available because we want
  126.  * flex-generated scanners to compile on their own).
  127.  */
  128. typedef unsigned int yy_size_t;
  129.  
  130.  
  131. struct yy_buffer_state {
  132.     istream* yy_input_file;
  133.     char*    yy_ch_buf;        // input buffer
  134.     char*    yy_buf_pos;        // current position in input buffer
  135.  
  136.     // Size of input buffer in bytes, not including room for EOB characters.
  137.     yy_size_t yy_buf_size;
  138.  
  139.     // Number of characters read into yy_ch_buf, not including EOB characters.
  140.     int yy_n_chars;
  141.  
  142.     /* Whether we "own" the buffer - i.e., we know we created it, and
  143.      * can realloc() it to grow it, and should free() it to delete it.
  144.      */
  145.     int yy_is_our_buffer;
  146.  
  147.     /* Whether this is an "interactive" input source; if so, and if we're
  148.      * using stdio for input, then we want to use getc() instead of
  149.      * fread(), to make sure we stop fetching input after each newline.
  150.      */
  151.     int yy_is_interactive;
  152.  
  153.     /* Whether we're considered to be at the beginning of a line.
  154.      * If so, '^' rules will be active on the next match, otherwise not.
  155.      */
  156.     int yy_at_bol;
  157.  
  158.     // Whether to try to fill the input buffer when we reach the end of it.
  159.     int yy_fill_buffer;
  160.  
  161.     int yy_buffer_status;
  162. #define YY_BUFFER_NEW        0
  163. #define YY_BUFFER_NORMAL    1
  164.     /* When an EOF's been seen but there's still some text to process
  165.      * then we mark the buffer as YY_EOF_PENDING, to indicate that we
  166.      * shouldn't try reading from the input source any more.  We might
  167.      * still have a bunch of tokens to match, though, because of
  168.      * possible backing-up.
  169.      *
  170.      * When we actually see the EOF, we change the status to "new"
  171.      * (via yyrestart()), so that the user can continue scanning by
  172.      * just pointing yyin at a new input file.
  173.      */
  174. #define YY_BUFFER_EOF_PENDING 2
  175. };
  176.  
  177. static YY_BUFFER_STATE yy_current_buffer = 0;
  178.  
  179. /* We provide macros for accessing buffer states in case in the
  180.  * future we want to put the buffer states in a more general
  181.  * "scanner state".
  182.  */
  183. #define YY_CURRENT_BUFFER yy_current_buffer
  184.  
  185.  
  186. // yy_hold_char holds the character lost when yytext is formed.
  187. static char yy_hold_char;
  188.  
  189. static int yy_n_chars;        // number of characters read into yy_ch_buf
  190.  
  191.  
  192. int yyleng;
  193.  
  194. // Points to current character in buffer.
  195. static char* yy_c_buf_p = (char*) 0;
  196. static int yy_init    = 1;    // whether we need to initialize
  197. static int yy_start    = 0;    // start state number
  198.  
  199. /* Flag which is used to allow yywrap()'s to do buffer switches
  200.  * instead of setting up a fresh yyin.  A bit of a hack ...
  201.  */
  202. static int yy_did_buffer_switch_on_eof;
  203.  
  204. void yyrestart                    (istream* input_file);
  205.  
  206. void yy_switch_to_buffer        (YY_BUFFER_STATE new_buffer);
  207. void yy_load_buffer_state        (void);
  208. YY_BUFFER_STATE yy_create_buffer(istream* file, int size);
  209. void yy_delete_buffer            (YY_BUFFER_STATE b);
  210. void yy_init_buffer                (YY_BUFFER_STATE b, istream* file);
  211. void yy_flush_buffer            (YY_BUFFER_STATE b);
  212. #define YY_FLUSH_BUFFER yy_flush_buffer(yy_current_buffer)
  213.  
  214. YY_BUFFER_STATE yy_scan_buffer    (char* base, yy_size_t size);
  215. YY_BUFFER_STATE yy_scan_string    (yyconst char* str);
  216. YY_BUFFER_STATE yy_scan_bytes    (yyconst char* bytes, int len);
  217.  
  218. static void*    yy_flex_alloc    (yy_size_t);
  219. static void*    yy_flex_realloc    (void*, yy_size_t);
  220. static void        yy_flex_free    (void*);
  221.  
  222. #define yy_new_buffer    yy_create_buffer
  223.  
  224. #define yy_set_interactive(is_interactive)    { \
  225.     if ( ! yy_current_buffer ) \
  226.         yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
  227.     yy_current_buffer->yy_is_interactive = is_interactive; \
  228.     }
  229.  
  230. #define yy_set_bol(at_bol)    { \
  231.     if ( ! yy_current_buffer ) \
  232.         yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
  233.     yy_current_buffer->yy_at_bol = at_bol; \
  234.     }
  235.  
  236. #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
  237.  
  238. typedef unsigned char YY_CHAR;
  239. FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
  240. typedef int yy_state_type;
  241. extern char *yytext;
  242. #define yytext_ptr yytext
  243.  
  244. static yy_state_type    yy_get_previous_state    (void);
  245. static yy_state_type    yy_try_NUL_trans        (yy_state_type current_state);
  246. static int                yy_get_next_buffer        (void);
  247. static void                yy_fatal_error            (yyconst char msg[]);
  248.  
  249. /* Done after the current pattern has been matched and before the
  250.  * corresponding action - sets up yytext.
  251.  */
  252. #define    YY_DO_BEFORE_ACTION    yytext_ptr = yy_bp; \
  253.     yyleng = (int) (yy_cp - yy_bp); \
  254.     yy_hold_char = *yy_cp; \
  255.     *yy_cp = '\0'; \
  256.     yy_c_buf_p = yy_cp;
  257.  
  258. #define YY_NUM_RULES 165
  259. #define YY_END_OF_BUFFER 166
  260.  
  261.  
  262. // vvvvvvvvvvvvvvvvvvvvvvvvv Inserted in Place of static arrays vvvvvvvvvvvvvvvvvvvvvvvvv
  263. #include "Res.h"
  264.  
  265. #define YY_USER_INIT    InitScanArrays()
  266.  
  267. static const short int*    yy_accept;
  268. static const int*        yy_ec;
  269. static const int*        yy_meta;
  270. static const short int*    yy_base;
  271. static const short int*    yy_def;
  272. static const short int*    yy_nxt;
  273. static const short int*    yy_chk;
  274.  
  275.  
  276. void
  277. InitScanArrays (void)
  278. {
  279.     SLoad(yy_accept);
  280.     LLoad(yy_ec);
  281.     LLoad(yy_meta);
  282.     SLoad(yy_base);
  283.     SLoad(yy_def);
  284.     SLoad(yy_nxt);
  285.     SLoad(yy_chk);
  286. }
  287. // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  288.  
  289.  
  290. static yy_state_type yy_last_accepting_state;
  291. static char *yy_last_accepting_cpos;
  292.  
  293. /* The intent behind this definition is that it'll catch
  294.  * any uses of REJECT which flex missed.
  295.  */
  296. #define REJECT reject_used_but_not_detected
  297. #define yymore() yymore_used_but_not_detected
  298. #define YY_MORE_ADJ 0
  299. char *yytext;
  300. #line 1 "scan.l"
  301. #define INITIAL 0
  302. /* scan.l - scanner for flex input */
  303. #line 4 "scan.l"
  304. /*-
  305.  * Copyright (c) 1990 The Regents of the University of California.
  306.  * All rights reserved.
  307.  *
  308.  * This code is derived from software contributed to Berkeley by
  309.  * Vern Paxson.
  310.  * 
  311.  * The United States Government has rights in this work pursuant
  312.  * to contract no. DE-AC03-76SF00098 between the United States
  313.  * Department of Energy and the University of California.
  314.  *
  315.  * Redistribution and use in source and binary forms are permitted provided
  316.  * that: (1) source distributions retain this entire copyright notice and
  317.  * comment, and (2) distributions including binaries display the following
  318.  * acknowledgement:  ``This product includes software developed by the
  319.  * University of California, Berkeley and its contributors'' in the
  320.  * documentation or other materials provided with the distribution and in
  321.  * all advertising materials mentioning features or use of this software.
  322.  * Neither the name of the University nor the names of its contributors may
  323.  * be used to endorse or promote products derived from this software without
  324.  * specific prior written permission.
  325.  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
  326.  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  327.  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  328.  */
  329.  
  330. /* $Header: /home/daffy/u0/vern/flex/RCS/scan.l,v 2.56 95/04/24 12:17:19 vern Exp $ */
  331.  
  332. #include "flexdef.h"
  333. #include "parse.h"
  334.  
  335. #define ACTION_ECHO add_action( yytext )
  336. #define ACTION_IFDEF(def, should_define) \
  337.     { \
  338.     if ( should_define ) \
  339.         action_define( def, 1 ); \
  340.     }
  341.  
  342. #define MARK_END_OF_PROLOG mark_prolog();
  343.  
  344. #define YY_DECL \
  345.     int flexscan()
  346.  
  347. #define RETURNCHAR \
  348.     yylval = (unsigned char) yytext[0]; \
  349.     return CHAR;
  350.  
  351. #define RETURNNAME \
  352.     strcpy( nmstr, yytext ); \
  353.     return NAME;
  354.  
  355. #define PUT_BACK_STRING(str, start) \
  356.     for ( i = strlen( str ) - 1; i >= start; --i ) \
  357.         unput((str)[i])
  358.  
  359. #define CHECK_REJECT(str) \
  360.     if ( all_upper( str ) ) \
  361.         reject = true;
  362.  
  363. #define CHECK_YYMORE(str) \
  364.     if ( all_lower( str ) ) \
  365.         yymore_used = true;
  366. #define YY_STACK_USED 1
  367. #define YY_NO_TOP_STATE 1
  368. #define SECT2 1
  369. #define SECT2PROLOG 2
  370. #define SECT3 3
  371. #define CODEBLOCK 4
  372. #define PICKUPDEF 5
  373. #define SC 6
  374. #define CARETISBOL 7
  375. #define NUM 8
  376. #define QUOTE 9
  377.  
  378. #define FIRSTCCL 10
  379. #define CCL 11
  380. #define ACTION 12
  381. #define RECOVER 13
  382. #define COMMENT 14
  383. #define ACTION_STRING 15
  384. #define PERCENT_BRACE_ACTION 16
  385.  
  386. #define OPTION 17
  387. #define LINEDIR 18
  388.  
  389. /*NL        \r?\n    changed to just \n by CEH */
  390. #line 1267 "scan.c"
  391.  
  392. /* Macros after this point can all be overridden by user definitions in
  393.  * section 1.
  394.  */
  395.  
  396. #ifndef YY_SKIP_YYWRAP
  397. extern YY_C int yywrap (void);
  398. #endif
  399.  
  400. #ifndef YY_NO_UNPUT
  401. static void yyunput (int c, char* buf_ptr);
  402. #endif
  403.  
  404. #ifndef yytext_ptr
  405. static void yy_flex_strncpy (char*, yyconst char*, int);
  406. #endif
  407.  
  408. #ifndef YY_NO_INPUT
  409. static int yyinput (void);
  410. #endif
  411.  
  412. #if YY_STACK_USED
  413. static int yy_start_stack_ptr    = 0;
  414. static int yy_start_stack_depth    = 0;
  415. static int *yy_start_stack        = 0;
  416. #ifndef YY_NO_PUSH_STATE
  417. static void yy_push_state    (int new_state);
  418. #endif
  419. #ifndef YY_NO_POP_STATE
  420. static void yy_pop_state    (void);
  421. #endif
  422. #ifndef YY_NO_TOP_STATE
  423. static int yy_top_state        (void);
  424. #endif
  425.  
  426. #else
  427. #define YY_NO_PUSH_STATE    1
  428. #define YY_NO_POP_STATE        1
  429. #define YY_NO_TOP_STATE        1
  430. #endif
  431.  
  432. #ifdef YY_MALLOC_DECL
  433. YY_MALLOC_DECL
  434. #else
  435. #if __STDC__
  436. #ifndef __cplusplus
  437. #include <stdlib.h>
  438. #endif
  439. #else
  440. /* Just try to get by without declaring the routines.  This will fail
  441.  * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
  442.  * or sizeof(void*) != sizeof(int).
  443.  */
  444. #endif
  445. #endif
  446.  
  447. // Amount of stuff to slurp up with each read.
  448. #ifndef YY_READ_BUF_SIZE
  449. #define YY_READ_BUF_SIZE 8192
  450. #endif
  451.  
  452. // Copy whatever the last rule matched to the standard output.
  453.  
  454. #ifndef ECHO
  455. /* This used to be an fputs(), but since the string might contain NUL's,
  456.  * we now use fwrite().
  457.  */
  458. #define ECHO    (void) fwrite(yytext, yyleng, 1, yyout)
  459. #endif
  460.  
  461. /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
  462.  * is returned in "result".
  463.  */
  464. #ifndef YY_INPUT
  465. #define YY_INPUT(buf,result,max_size) \
  466.     if ( yy_current_buffer->yy_is_interactive ) \
  467.         { \
  468.         int c = '*', n; \
  469.         for ( n = 0; n < max_size && \
  470.                  (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
  471.             buf[n] = (char) c; \
  472.         if ( c == '\n' ) \
  473.             buf[n++] = (char) c; \
  474.         if ( c == EOF && ferror( yyin ) ) \
  475.             YY_FATAL_ERROR( "input in flex scanner failed" ); \
  476.         result = n; \
  477.         } \
  478.     else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
  479.           && ferror( yyin ) ) \
  480.         YY_FATAL_ERROR( "input in flex scanner failed" );
  481. #endif
  482.  
  483. /* No semi-colon after return; correct usage is to write "yyterminate();" -
  484.  * we don't want an extra ';' after the "return" because that will cause
  485.  * some compilers to complain about unreachable statements.
  486.  */
  487. #ifndef yyterminate
  488. #define yyterminate() return YY_NULL
  489. #endif
  490.  
  491. // Number of entries by which start-condition stack grows.
  492. #ifndef YY_START_STACK_INCR
  493. #define YY_START_STACK_INCR 25
  494. #endif
  495.  
  496. // Report a fatal error.
  497. #ifndef YY_FATAL_ERROR
  498. #define YY_FATAL_ERROR(msg) yy_fatal_error(msg)
  499. #endif
  500.  
  501. /* Default declaration of generated scanner - a define so the user can
  502.  * easily add parameters.
  503.  */
  504. #ifndef YY_DECL
  505. #define YY_DECL    YY_DECLARE(int) yylex()
  506. #endif
  507.  
  508. /* Code executed at the beginning of each rule, after yytext and yyleng
  509.  * have been set up.
  510.  */
  511. #ifndef YY_USER_ACTION
  512. #define YY_USER_ACTION
  513. #endif
  514.  
  515. // Code executed at the end of each rule.
  516. #ifndef YY_BREAK
  517. #define YY_BREAK break;
  518. #endif
  519.  
  520. #define YY_RULE_SETUP \
  521.     if ( yyleng > 0 ) \
  522.         yy_current_buffer->yy_at_bol = \
  523.                 (yytext[yyleng - 1] == '\n'); \
  524.     YY_USER_ACTION
  525.  
  526. YY_DECL
  527. {
  528.     register yy_state_type yy_current_state;
  529.     register char *yy_cp, *yy_bp;
  530.     register int yy_act;
  531.  
  532. #line 95 "scan.l"
  533.  
  534.     static int bracelevel, didadef, indented_code;
  535.     static int doing_rule_action = false;
  536.     static int option_sense;
  537.  
  538.     int doing_codeblock = false;
  539.     int i;
  540.     Char nmdef[MAXLINE] /* CEH , myesc() */;
  541.  
  542.  
  543. #line 1420 "scan.c"
  544.  
  545.     if ( yy_init ) {
  546.         yy_init = 0;
  547.  
  548. #ifdef YY_USER_INIT
  549.         YY_USER_INIT;
  550. #endif
  551.  
  552.         if ( ! yy_start )
  553.             yy_start = 1;    /* first start state */
  554.  
  555.         if ( ! yyin )
  556.             yyin = stdin;
  557.  
  558.         if ( ! yyout )
  559.             yyout = stdout;
  560.  
  561.         if ( ! yy_current_buffer )
  562.             yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
  563.  
  564.         yy_load_buffer_state();
  565.     }
  566.  
  567.     while (1) {        // loops until end-of-file is reached
  568.         yy_cp = yy_c_buf_p;
  569.  
  570.         // Support of yytext.
  571.         *yy_cp = yy_hold_char;
  572.  
  573.         /* yy_bp points to the position in yy_ch_buf of the start of
  574.          * the current run.
  575.          */
  576.         yy_bp = yy_cp;
  577.  
  578.         yy_current_state = yy_start;
  579.         yy_current_state += YY_AT_BOL();
  580. yy_match:
  581.         do
  582.             {
  583.             register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
  584.             if ( yy_accept[yy_current_state] )
  585.                 {
  586.                 yy_last_accepting_state = yy_current_state;
  587.                 yy_last_accepting_cpos = yy_cp;
  588.                 }
  589.             while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  590.                 {
  591.                 yy_current_state = (int) yy_def[yy_current_state];
  592.                 if ( yy_current_state >= 726 )
  593.                     yy_c = yy_meta[(unsigned int) yy_c];
  594.                 }
  595.             yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  596.             ++yy_cp;
  597.             }
  598.         while ( yy_base[yy_current_state] != 2598 );
  599.  
  600. yy_find_action:
  601.         yy_act = yy_accept[yy_current_state];
  602.         if ( yy_act == 0 )
  603.             { /* have to back up */
  604.             yy_cp = yy_last_accepting_cpos;
  605.             yy_current_state = yy_last_accepting_state;
  606.             yy_act = yy_accept[yy_current_state];
  607.             }
  608.  
  609.         YY_DO_BEFORE_ACTION;
  610.  
  611.  
  612. do_action:    // This label is used only to access EOF actions.
  613.  
  614.  
  615.         switch (yy_act) { // beginning of action switch
  616.             case 0: /* must back up */
  617.             /* undo the effects of YY_DO_BEFORE_ACTION */
  618.             *yy_cp = yy_hold_char;
  619.             yy_cp = yy_last_accepting_cpos;
  620.             yy_current_state = yy_last_accepting_state;
  621.             goto yy_find_action;
  622.  
  623.  
  624. case 1:
  625. YY_RULE_SETUP
  626. #line 106 "scan.l"
  627. indented_code = true; BEGIN(CODEBLOCK);
  628.     YY_BREAK
  629. case 2:
  630. YY_RULE_SETUP
  631. #line 107 "scan.l"
  632. ACTION_ECHO; yy_push_state( COMMENT );
  633.     YY_BREAK
  634. case 3:
  635. YY_RULE_SETUP
  636. #line 108 "scan.l"
  637. yy_push_state( LINEDIR );
  638.     YY_BREAK
  639. case 4:
  640. YY_RULE_SETUP
  641. #line 109 "scan.l"
  642. return SCDECL;
  643.     YY_BREAK
  644. case 5:
  645. YY_RULE_SETUP
  646. #line 110 "scan.l"
  647. return XSCDECL;
  648.     YY_BREAK
  649. case 6:
  650. YY_RULE_SETUP
  651. #line 111 "scan.l"
  652. {
  653.             ++linenum;
  654.             line_directive_out( (FILE *) 0, 1 );
  655.             indented_code = false;
  656.             BEGIN(CODEBLOCK);
  657.             }
  658.     YY_BREAK
  659. case 7:
  660. YY_RULE_SETUP
  661. #line 118 "scan.l"
  662. /* discard */
  663.     YY_BREAK
  664. case 8:
  665. YY_RULE_SETUP
  666. #line 120 "scan.l"
  667. {
  668.             sectnum = 2;
  669.             bracelevel = 0;
  670.             mark_defs1();
  671.             line_directive_out( (FILE *) 0, 1 );
  672.             BEGIN(SECT2PROLOG);
  673.             return SECTEND;
  674.             }
  675.     YY_BREAK
  676. case 9:
  677. YY_RULE_SETUP
  678. #line 129 "scan.l"
  679. yytext_is_array = false; ++linenum;
  680.     YY_BREAK
  681. case 10:
  682. YY_RULE_SETUP
  683. #line 130 "scan.l"
  684. yytext_is_array = true; ++linenum;
  685.     YY_BREAK
  686. case 11:
  687. YY_RULE_SETUP
  688. #line 132 "scan.l"
  689. BEGIN(OPTION); return OPTION_OP;
  690.     YY_BREAK
  691. case 12:
  692. YY_RULE_SETUP
  693. #line 134 "scan.l"
  694. ++linenum; /* ignore */
  695.     YY_BREAK
  696. case 13:
  697. YY_RULE_SETUP
  698. #line 135 "scan.l"
  699. ++linenum;    /* ignore */
  700.     YY_BREAK
  701. case 14:
  702. YY_RULE_SETUP
  703. #line 137 "scan.l"
  704. synerr( _( "unrecognized '%' directive" ) );
  705.     YY_BREAK
  706. case 15:
  707. YY_RULE_SETUP
  708. #line 139 "scan.l"
  709. {
  710.             strcpy( nmstr, yytext );
  711.             didadef = false;
  712.             BEGIN(PICKUPDEF);
  713.             }
  714.     YY_BREAK
  715. case 16:
  716. YY_RULE_SETUP
  717. #line 145 "scan.l"
  718. RETURNNAME;
  719.     YY_BREAK
  720. case 17:
  721. YY_RULE_SETUP
  722. #line 146 "scan.l"
  723. ++linenum; /* allows blank lines in section 1 */
  724.     YY_BREAK
  725. case 18:
  726. YY_RULE_SETUP
  727. #line 147 "scan.l"
  728. ACTION_ECHO; ++linenum; /* maybe end of comment line */
  729.     YY_BREAK
  730.  
  731.  
  732. case 19:
  733. YY_RULE_SETUP
  734. #line 152 "scan.l"
  735. ACTION_ECHO; yy_pop_state();
  736.     YY_BREAK
  737. case 20:
  738. YY_RULE_SETUP
  739. #line 153 "scan.l"
  740. ACTION_ECHO;
  741.     YY_BREAK
  742. case 21:
  743. YY_RULE_SETUP
  744. #line 154 "scan.l"
  745. ACTION_ECHO;
  746.     YY_BREAK
  747. case 22:
  748. YY_RULE_SETUP
  749. #line 155 "scan.l"
  750. ++linenum; ACTION_ECHO;
  751.     YY_BREAK
  752.  
  753.  
  754. case 23:
  755. YY_RULE_SETUP
  756. #line 159 "scan.l"
  757. yy_pop_state();
  758.     YY_BREAK
  759. case 24:
  760. YY_RULE_SETUP
  761. #line 160 "scan.l"
  762. linenum = myctoi( yytext );
  763.     YY_BREAK
  764. case 25:
  765. YY_RULE_SETUP
  766. #line 162 "scan.l"
  767. {
  768.             flex_free( (void *) infilename );
  769.             infilename = copy_string( yytext + 1 );
  770.             infilename[strlen( infilename ) - 1] = '\0';
  771.             }
  772.     YY_BREAK
  773. case 26:
  774. YY_RULE_SETUP
  775. #line 167 "scan.l"
  776. /* ignore spurious characters */
  777.     YY_BREAK
  778.  
  779.  
  780. case 27:
  781. YY_RULE_SETUP
  782. #line 171 "scan.l"
  783. ++linenum; BEGIN(INITIAL);
  784.     YY_BREAK
  785. case 28:
  786. YY_RULE_SETUP
  787. #line 173 "scan.l"
  788. ACTION_ECHO;
  789.     YY_BREAK
  790. case 29:
  791. YY_RULE_SETUP
  792. #line 175 "scan.l"
  793. {
  794.             ++linenum;
  795.             ACTION_ECHO;
  796.             if ( indented_code )
  797.                 BEGIN(INITIAL);
  798.             }
  799.     YY_BREAK
  800.  
  801.  
  802. case 30:
  803. YY_RULE_SETUP
  804. #line 185 "scan.l"
  805. /* separates name and definition */
  806.     YY_BREAK
  807. case 31:
  808. YY_RULE_SETUP
  809. #line 187 "scan.l"
  810. {
  811.             strcpy( (char *) nmdef, yytext );
  812.  
  813.             /* Skip trailing whitespace. */
  814.             for ( i = strlen( (char *) nmdef ) - 1;
  815.                   i >= 0 && (nmdef[i] == ' ' || nmdef[i] == '\t');
  816.                   --i )
  817.                 ;
  818.  
  819.             nmdef[i + 1] = '\0';
  820.  
  821.             ndinstal( nmstr, nmdef );
  822.             didadef = true;
  823.             }
  824.     YY_BREAK
  825. case 32:
  826. YY_RULE_SETUP
  827. #line 202 "scan.l"
  828. {
  829.             if ( ! didadef )
  830.                 synerr( _( "incomplete name definition" ) );
  831.             BEGIN(INITIAL);
  832.             ++linenum;
  833.             }
  834.     YY_BREAK
  835.  
  836.  
  837. case 33:
  838. YY_RULE_SETUP
  839. #line 212 "scan.l"
  840. ++linenum; BEGIN(INITIAL);
  841.     YY_BREAK
  842. case 34:
  843. YY_RULE_SETUP
  844. #line 213 "scan.l"
  845. option_sense = true;
  846.     YY_BREAK
  847. case 35:
  848. YY_RULE_SETUP
  849. #line 215 "scan.l"
  850. return '=';
  851.     YY_BREAK
  852. case 36:
  853. YY_RULE_SETUP
  854. #line 217 "scan.l"
  855. option_sense = ! option_sense;
  856.     YY_BREAK
  857. case 37:
  858. YY_RULE_SETUP
  859. #line 219 "scan.l"
  860. csize = option_sense ? 128 : 256;
  861.     YY_BREAK
  862. case 38:
  863. YY_RULE_SETUP
  864. #line 220 "scan.l"
  865. csize = option_sense ? 256 : 128;
  866.     YY_BREAK
  867. case 39:
  868. YY_RULE_SETUP
  869. #line 222 "scan.l"
  870. long_align = option_sense;
  871.     YY_BREAK
  872. case 40:
  873. YY_RULE_SETUP
  874. #line 223 "scan.l"
  875. {
  876.             action_define( "YY_ALWAYS_INTERACTIVE", option_sense );
  877.             }
  878.     YY_BREAK
  879. case 41:
  880. YY_RULE_SETUP
  881. #line 226 "scan.l"
  882. yytext_is_array = option_sense;
  883.     YY_BREAK
  884. case 42:
  885. YY_RULE_SETUP
  886. #line 227 "scan.l"
  887. backing_up_report = option_sense;
  888.     YY_BREAK
  889. case 43:
  890. YY_RULE_SETUP
  891. #line 228 "scan.l"
  892. interactive = ! option_sense;
  893.     YY_BREAK
  894. case 44:
  895. YY_RULE_SETUP
  896. #line 229 "scan.l"
  897. C_plus_plus = option_sense;
  898.     YY_BREAK
  899. case 45:
  900. YY_RULE_SETUP
  901. #line 230 "scan.l"
  902. caseins = ! option_sense;
  903.     YY_BREAK
  904. case 46:
  905. YY_RULE_SETUP
  906. #line 231 "scan.l"
  907. caseins = option_sense;
  908.     YY_BREAK
  909. case 47:
  910. YY_RULE_SETUP
  911. #line 232 "scan.l"
  912. ddebug = option_sense;
  913.     YY_BREAK
  914. case 48:
  915. YY_RULE_SETUP
  916. #line 233 "scan.l"
  917. spprdflt = ! option_sense;
  918.     YY_BREAK
  919. case 49:
  920. YY_RULE_SETUP
  921. #line 234 "scan.l"
  922. useecs = option_sense;
  923.     YY_BREAK
  924. case 50:
  925. YY_RULE_SETUP
  926. #line 235 "scan.l"
  927. {
  928.             useecs = usemecs = false;
  929.             use_read = fullspd = true;
  930.             }
  931.     YY_BREAK
  932. case 51:
  933. YY_RULE_SETUP
  934. #line 239 "scan.l"
  935. {
  936.             useecs = usemecs = false;
  937.             use_read = fulltbl = true;
  938.             }
  939.     YY_BREAK
  940. case 52:
  941. YY_RULE_SETUP
  942. #line 243 "scan.l"
  943. ACTION_IFDEF("YY_NO_INPUT", ! option_sense);
  944.     YY_BREAK
  945. case 53:
  946. YY_RULE_SETUP
  947. #line 244 "scan.l"
  948. interactive = option_sense;
  949.     YY_BREAK
  950. case 54:
  951. YY_RULE_SETUP
  952. #line 245 "scan.l"
  953. lex_compat = option_sense;
  954.     YY_BREAK
  955. case 55:
  956. YY_RULE_SETUP
  957. #line 246 "scan.l"
  958. {
  959.             action_define( "YY_MAIN", option_sense );
  960.             do_yywrap = ! option_sense;
  961.             }
  962.     YY_BREAK
  963. case 56:
  964. YY_RULE_SETUP
  965. #line 250 "scan.l"
  966. usemecs = option_sense;
  967.     YY_BREAK
  968. case 57:
  969. YY_RULE_SETUP
  970. #line 251 "scan.l"
  971. {
  972.             action_define( "YY_NEVER_INTERACTIVE", option_sense );
  973.             }
  974.     YY_BREAK
  975. case 58:
  976. YY_RULE_SETUP
  977. #line 254 "scan.l"
  978. performance_report += option_sense ? 1 : -1;
  979.     YY_BREAK
  980. case 59:
  981. YY_RULE_SETUP
  982. #line 255 "scan.l"
  983. yytext_is_array = ! option_sense;
  984.     YY_BREAK
  985. case 60:
  986. YY_RULE_SETUP
  987. #line 256 "scan.l"
  988. use_read = option_sense;
  989.     YY_BREAK
  990. case 61:
  991. YY_RULE_SETUP
  992. #line 257 "scan.l"
  993. reject_really_used = option_sense;
  994.     YY_BREAK
  995. case 62:
  996. YY_RULE_SETUP
  997. #line 258 "scan.l"
  998. action_define( "YY_STACK_USED", option_sense );
  999.     YY_BREAK
  1000. case 63:
  1001. YY_RULE_SETUP
  1002. #line 259 "scan.l"
  1003. do_stdinit = option_sense;
  1004.     YY_BREAK
  1005. case 64:
  1006. YY_RULE_SETUP
  1007. #line 260 "scan.l"
  1008. use_stdout = option_sense;
  1009.     YY_BREAK
  1010. case 65:
  1011. YY_RULE_SETUP
  1012. #line 261 "scan.l"
  1013. ACTION_IFDEF("YY_NO_UNPUT", ! option_sense);
  1014.     YY_BREAK
  1015. case 66:
  1016. YY_RULE_SETUP
  1017. #line 262 "scan.l"
  1018. printstats = option_sense;
  1019.     YY_BREAK
  1020. case 67:
  1021. YY_RULE_SETUP
  1022. #line 263 "scan.l"
  1023. nowarn = ! option_sense;
  1024.     YY_BREAK
  1025. case 68:
  1026. YY_RULE_SETUP
  1027. #line 264 "scan.l"
  1028. do_yylineno = option_sense;
  1029.     YY_BREAK
  1030. case 69:
  1031. YY_RULE_SETUP
  1032. #line 265 "scan.l"
  1033. yymore_really_used = option_sense;
  1034.     YY_BREAK
  1035. case 70:
  1036. YY_RULE_SETUP
  1037. #line 266 "scan.l"
  1038. do_yywrap = option_sense;
  1039.     YY_BREAK
  1040. case 71:
  1041. YY_RULE_SETUP
  1042. #line 268 "scan.l"
  1043. ACTION_IFDEF("YY_NO_PUSH_STATE", ! option_sense);
  1044.     YY_BREAK
  1045. case 72:
  1046. YY_RULE_SETUP
  1047. #line 269 "scan.l"
  1048. ACTION_IFDEF("YY_NO_POP_STATE", ! option_sense);
  1049.     YY_BREAK
  1050. case 73:
  1051. YY_RULE_SETUP
  1052. #line 270 "scan.l"
  1053. ACTION_IFDEF("YY_NO_TOP_STATE", ! option_sense);
  1054.     YY_BREAK
  1055. case 74:
  1056. YY_RULE_SETUP
  1057. #line 272 "scan.l"
  1058. ACTION_IFDEF("YY_NO_SCAN_BUFFER", ! option_sense);
  1059.     YY_BREAK
  1060. case 75:
  1061. YY_RULE_SETUP
  1062. #line 273 "scan.l"
  1063. ACTION_IFDEF("YY_NO_SCAN_BYTES", ! option_sense);
  1064.     YY_BREAK
  1065. case 76:
  1066. YY_RULE_SETUP
  1067. #line 274 "scan.l"
  1068. ACTION_IFDEF("YY_NO_SCAN_STRING", ! option_sense);
  1069.     YY_BREAK
  1070. case 77:
  1071. YY_RULE_SETUP
  1072. #line 276 "scan.l"
  1073. return OPT_OUTFILE;
  1074.     YY_BREAK
  1075. case 78:
  1076. YY_RULE_SETUP
  1077. #line 277 "scan.l"
  1078. return OPT_PREFIX;
  1079.     YY_BREAK
  1080. case 79:
  1081. YY_RULE_SETUP
  1082. #line 278 "scan.l"
  1083. return OPT_YYCLASS;
  1084.     YY_BREAK
  1085. case 80:
  1086. YY_RULE_SETUP
  1087. #line 280 "scan.l"
  1088. {
  1089.             strcpy( nmstr, yytext + 1 );
  1090.             nmstr[strlen( nmstr ) - 1] = '\0';
  1091.             return NAME;
  1092.             }
  1093.     YY_BREAK
  1094. case 81:
  1095. YY_RULE_SETUP
  1096. #line 286 "scan.l"
  1097. {
  1098.             format_synerr( _( "unrecognized %%option: %s" ),
  1099.                 yytext );
  1100.             BEGIN(RECOVER);
  1101.             }
  1102.     YY_BREAK
  1103.  
  1104. case 82:
  1105. YY_RULE_SETUP
  1106. #line 293 "scan.l"
  1107. ++linenum; BEGIN(INITIAL);
  1108.     YY_BREAK
  1109.  
  1110. case 83:
  1111. YY_RULE_SETUP
  1112. #line 297 "scan.l"
  1113. ++bracelevel; yyless( 2 );    /* eat only %{ */
  1114.     YY_BREAK
  1115. case 84:
  1116. YY_RULE_SETUP
  1117. #line 298 "scan.l"
  1118. --bracelevel; yyless( 2 );    /* eat only %} */
  1119.     YY_BREAK
  1120. case 85:
  1121. YY_RULE_SETUP
  1122. #line 300 "scan.l"
  1123. ACTION_ECHO;    /* indented code in prolog */
  1124.     YY_BREAK
  1125. case 86:
  1126. YY_RULE_SETUP
  1127. #line 302 "scan.l"
  1128. {    /* non-indented code */
  1129.             if ( bracelevel <= 0 )
  1130.                 { /* not in %{ ... %} */
  1131.                 yyless( 0 );    /* put it all back */
  1132.                 yy_set_bol( 1 );
  1133.                 mark_prolog();
  1134.                 BEGIN(SECT2);
  1135.                 }
  1136.             else
  1137.                 ACTION_ECHO;
  1138.             }
  1139.     YY_BREAK
  1140. case 87:
  1141. YY_RULE_SETUP
  1142. #line 314 "scan.l"
  1143. ACTION_ECHO;
  1144.     YY_BREAK
  1145. case 88:
  1146. YY_RULE_SETUP
  1147. #line 315 "scan.l"
  1148. ++linenum; ACTION_ECHO;
  1149.     YY_BREAK
  1150. case YY_STATE_EOF(SECT2PROLOG):
  1151. #line 317 "scan.l"
  1152. {
  1153.             mark_prolog();
  1154.             sectnum = 0;
  1155.             yyterminate(); /* to stop the parser */
  1156.             }
  1157.     YY_BREAK
  1158.  
  1159.  
  1160. case 89:
  1161. YY_RULE_SETUP
  1162. #line 325 "scan.l"
  1163. ++linenum; /* allow blank lines in section 2 */
  1164.     YY_BREAK
  1165. case 90:
  1166. YY_RULE_SETUP
  1167. #line 327 "scan.l"
  1168. {
  1169.             indented_code = false;
  1170.             doing_codeblock = true;
  1171.             bracelevel = 1;
  1172.             BEGIN(PERCENT_BRACE_ACTION);
  1173.             }
  1174.     YY_BREAK
  1175. case 91:
  1176. YY_RULE_SETUP
  1177. #line 334 "scan.l"
  1178. BEGIN(SC); return '<';
  1179.     YY_BREAK
  1180. case 92:
  1181. YY_RULE_SETUP
  1182. #line 335 "scan.l"
  1183. return '^';
  1184.     YY_BREAK
  1185. case 93:
  1186. YY_RULE_SETUP
  1187. #line 336 "scan.l"
  1188. BEGIN(QUOTE); return '"';
  1189.     YY_BREAK
  1190. case 94:
  1191. *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
  1192. yy_c_buf_p = yy_cp = yy_bp + 1;
  1193. YY_DO_BEFORE_ACTION; /* set up yytext again */
  1194. YY_RULE_SETUP
  1195. #line 337 "scan.l"
  1196. BEGIN(NUM); return '{';
  1197.     YY_BREAK
  1198. case 95:
  1199. *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
  1200. yy_c_buf_p = yy_cp = yy_bp + 1;
  1201. YY_DO_BEFORE_ACTION; /* set up yytext again */
  1202. YY_RULE_SETUP
  1203. #line 338 "scan.l"
  1204. return '$';
  1205.     YY_BREAK
  1206. case 96:
  1207. YY_RULE_SETUP
  1208. #line 340 "scan.l"
  1209. {
  1210.             bracelevel = 1;
  1211.             BEGIN(PERCENT_BRACE_ACTION);
  1212.  
  1213.             if ( in_rule )
  1214.                 {
  1215.                 doing_rule_action = true;
  1216.                 in_rule = false;
  1217.                 return '\n';
  1218.                 }
  1219.             }
  1220.     YY_BREAK
  1221. case 97:
  1222. YY_RULE_SETUP
  1223. #line 351 "scan.l"
  1224. continued_action = true; ++linenum; return '\n';
  1225.     YY_BREAK
  1226. case 98:
  1227. YY_RULE_SETUP
  1228. #line 353 "scan.l"
  1229. {
  1230.             yyless( yyleng - 2 );    /* put back '/', '*' */
  1231.             bracelevel = 0;
  1232.             continued_action = false;
  1233.             BEGIN(ACTION);
  1234.             }
  1235.     YY_BREAK
  1236. case 99:
  1237. YY_RULE_SETUP
  1238. #line 360 "scan.l"
  1239. /* allow indented rules */
  1240.     YY_BREAK
  1241. case 100:
  1242. YY_RULE_SETUP
  1243. #line 362 "scan.l"
  1244. {
  1245.             /* This rule is separate from the one below because
  1246.              * otherwise we get variable trailing context, so
  1247.              * we can't build the scanner using -{f,F}.
  1248.              */
  1249.             bracelevel = 0;
  1250.             continued_action = false;
  1251.             BEGIN(ACTION);
  1252.  
  1253.             if ( in_rule )
  1254.                 {
  1255.                 doing_rule_action = true;
  1256.                 in_rule = false;
  1257.                 return '\n';
  1258.                 }
  1259.             }
  1260.     YY_BREAK
  1261. case 101:
  1262. YY_RULE_SETUP
  1263. #line 379 "scan.l"
  1264. {
  1265.             bracelevel = 0;
  1266.             continued_action = false;
  1267.             BEGIN(ACTION);
  1268.             unput( '\n' );    /* so <ACTION> sees it */
  1269.  
  1270.             if ( in_rule )
  1271.                 {
  1272.                 doing_rule_action = true;
  1273.                 in_rule = false;
  1274.                 return '\n';
  1275.                 }
  1276.             }
  1277.     YY_BREAK
  1278. case 102:
  1279. #line 394 "scan.l"
  1280. case 103:
  1281. YY_RULE_SETUP
  1282. #line 394 "scan.l"
  1283. return EOF_OP;
  1284.     YY_BREAK
  1285. case 104:
  1286. YY_RULE_SETUP
  1287. #line 396 "scan.l"
  1288. {
  1289.             sectnum = 3;
  1290.             BEGIN(SECT3);
  1291.             yyterminate(); /* to stop the parser */
  1292.             }
  1293.     YY_BREAK
  1294. case 105:
  1295. YY_RULE_SETUP
  1296. #line 402 "scan.l"
  1297. {
  1298.             int cclval;
  1299.  
  1300.             strcpy( nmstr, yytext );
  1301.  
  1302.             /* Check to see if we've already encountered this
  1303.              * ccl.
  1304.              */
  1305.             if ( (cclval = ccllookup( (Char *) nmstr )) != 0 )
  1306.                 {
  1307.                 if ( yyinput() != ']' ) /* CEH */
  1308.                     synerr( _( "bad character class" ) );
  1309.  
  1310.                 yylval = cclval;
  1311.                 ++cclreuse;
  1312.                 return PREVCCL;
  1313.                 }
  1314.             else
  1315.                 {
  1316.                 /* We fudge a bit.  We know that this ccl will
  1317.                  * soon be numbered as lastccl + 1 by cclinit.
  1318.                  */
  1319.                 cclinstal( (Char *) nmstr, lastccl + 1 );
  1320.  
  1321.                 /* Push back everything but the leading bracket
  1322.                  * so the ccl can be rescanned.
  1323.                  */
  1324.                 yyless( 1 );
  1325.  
  1326.                 BEGIN(FIRSTCCL);
  1327.                 return '[';
  1328.                 }
  1329.             }
  1330.     YY_BREAK
  1331. case 106:
  1332. YY_RULE_SETUP
  1333. #line 436 "scan.l"
  1334. {
  1335.             register Char *nmdefptr;
  1336.     /* CEH        Char *ndlookup(); */
  1337.  
  1338.             strcpy( nmstr, yytext + 1 );
  1339.             nmstr[yyleng - 2] = '\0';  /* chop trailing brace */
  1340.  
  1341.             if ( (nmdefptr = ndlookup( nmstr )) == 0 )
  1342.                 format_synerr(
  1343.                     _( "undefined definition {%s}" ),
  1344.                         nmstr );
  1345.  
  1346.             else
  1347.                 { /* push back name surrounded by ()'s */
  1348.                 int len = strlen( (char *) nmdefptr );
  1349.  
  1350.                 if ( lex_compat || nmdefptr[0] == '^' ||
  1351.                      (len > 0 && nmdefptr[len - 1] == '$') )
  1352.                     { /* don't use ()'s after all */
  1353.                     PUT_BACK_STRING((char *) nmdefptr, 0);
  1354.  
  1355.                     if ( nmdefptr[0] == '^' )
  1356.                         BEGIN(CARETISBOL);
  1357.                     }
  1358.  
  1359.                 else
  1360.                     {
  1361.                     unput(')');
  1362.                     PUT_BACK_STRING((char *) nmdefptr, 0);
  1363.                     unput('(');
  1364.                     }
  1365.                 }
  1366.             }
  1367.     YY_BREAK
  1368. case 107:
  1369. YY_RULE_SETUP
  1370. #line 470 "scan.l"
  1371. return (unsigned char) yytext[0];
  1372.     YY_BREAK
  1373. case 108:
  1374. YY_RULE_SETUP
  1375. #line 471 "scan.l"
  1376. RETURNCHAR;
  1377.     YY_BREAK
  1378.  
  1379.  
  1380. case 109:
  1381. YY_RULE_SETUP
  1382. #line 476 "scan.l"
  1383. return (unsigned char) yytext[0];
  1384.     YY_BREAK
  1385. case 110:
  1386. YY_RULE_SETUP
  1387. #line 477 "scan.l"
  1388. BEGIN(SECT2); return '>';
  1389.     YY_BREAK
  1390. case 111:
  1391. *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
  1392. yy_c_buf_p = yy_cp = yy_bp + 1;
  1393. YY_DO_BEFORE_ACTION; /* set up yytext again */
  1394. YY_RULE_SETUP
  1395. #line 478 "scan.l"
  1396. BEGIN(CARETISBOL); return '>';
  1397.     YY_BREAK
  1398. case 112:
  1399. YY_RULE_SETUP
  1400. #line 479 "scan.l"
  1401. RETURNNAME;
  1402.     YY_BREAK
  1403. case 113:
  1404. YY_RULE_SETUP
  1405. #line 480 "scan.l"
  1406. {
  1407.             format_synerr( _( "bad <start condition>: %s" ),
  1408.                 yytext );
  1409.             }
  1410.     YY_BREAK
  1411.  
  1412. case 114:
  1413. YY_RULE_SETUP
  1414. #line 486 "scan.l"
  1415. BEGIN(SECT2); return '^';
  1416.     YY_BREAK
  1417.  
  1418. case 115:
  1419. YY_RULE_SETUP
  1420. #line 490 "scan.l"
  1421. RETURNCHAR;
  1422.     YY_BREAK
  1423. case 116:
  1424. YY_RULE_SETUP
  1425. #line 491 "scan.l"
  1426. BEGIN(SECT2); return '"';
  1427.     YY_BREAK
  1428. case 117:
  1429. YY_RULE_SETUP
  1430. #line 493 "scan.l"
  1431. {
  1432.             synerr( _( "missing quote" ) );
  1433.             BEGIN(SECT2);
  1434.             ++linenum;
  1435.             return '"';
  1436.             }
  1437.     YY_BREAK
  1438.  
  1439.  
  1440. case 118:
  1441. *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
  1442. yy_c_buf_p = yy_cp = yy_bp + 1;
  1443. YY_DO_BEFORE_ACTION; /* set up yytext again */
  1444. YY_RULE_SETUP
  1445. #line 503 "scan.l"
  1446. BEGIN(CCL); return '^';
  1447.     YY_BREAK
  1448. case 119:
  1449. *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
  1450. yy_c_buf_p = yy_cp = yy_bp + 1;
  1451. YY_DO_BEFORE_ACTION; /* set up yytext again */
  1452. YY_RULE_SETUP
  1453. #line 504 "scan.l"
  1454. return '^';
  1455.     YY_BREAK
  1456. case 120:
  1457. YY_RULE_SETUP
  1458. #line 505 "scan.l"
  1459. BEGIN(CCL); RETURNCHAR;
  1460.     YY_BREAK
  1461.  
  1462.  
  1463. case 121:
  1464. *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
  1465. yy_c_buf_p = yy_cp = yy_bp + 1;
  1466. YY_DO_BEFORE_ACTION; /* set up yytext again */
  1467. YY_RULE_SETUP
  1468. #line 509 "scan.l"
  1469. return '-';
  1470.     YY_BREAK
  1471. case 122:
  1472. YY_RULE_SETUP
  1473. #line 510 "scan.l"
  1474. RETURNCHAR;
  1475.     YY_BREAK
  1476. case 123:
  1477. YY_RULE_SETUP
  1478. #line 511 "scan.l"
  1479. BEGIN(SECT2); return ']';
  1480.     YY_BREAK
  1481. case 124:
  1482. YY_RULE_SETUP
  1483. #line 512 "scan.l"
  1484. {
  1485.             synerr( _( "bad character class" ) );
  1486.             BEGIN(SECT2);
  1487.             return ']';
  1488.             }
  1489.     YY_BREAK
  1490.  
  1491.  
  1492. case 125:
  1493. YY_RULE_SETUP
  1494. #line 520 "scan.l"
  1495. BEGIN(CCL); return CCE_ALNUM;
  1496.     YY_BREAK
  1497. case 126:
  1498. YY_RULE_SETUP
  1499. #line 521 "scan.l"
  1500. BEGIN(CCL); return CCE_ALPHA;
  1501.     YY_BREAK
  1502. case 127:
  1503. YY_RULE_SETUP
  1504. #line 522 "scan.l"
  1505. BEGIN(CCL); return CCE_BLANK;
  1506.     YY_BREAK
  1507. case 128:
  1508. YY_RULE_SETUP
  1509. #line 523 "scan.l"
  1510. BEGIN(CCL); return CCE_CNTRL;
  1511.     YY_BREAK
  1512. case 129:
  1513. YY_RULE_SETUP
  1514. #line 524 "scan.l"
  1515. BEGIN(CCL); return CCE_DIGIT;
  1516.     YY_BREAK
  1517. case 130:
  1518. YY_RULE_SETUP
  1519. #line 525 "scan.l"
  1520. BEGIN(CCL); return CCE_GRAPH;
  1521.     YY_BREAK
  1522. case 131:
  1523. YY_RULE_SETUP
  1524. #line 526 "scan.l"
  1525. BEGIN(CCL); return CCE_LOWER;
  1526.     YY_BREAK
  1527. case 132:
  1528. YY_RULE_SETUP
  1529. #line 527 "scan.l"
  1530. BEGIN(CCL); return CCE_PRINT;
  1531.     YY_BREAK
  1532. case 133:
  1533. YY_RULE_SETUP
  1534. #line 528 "scan.l"
  1535. BEGIN(CCL); return CCE_PUNCT;
  1536.     YY_BREAK
  1537. case 134:
  1538. YY_RULE_SETUP
  1539. #line 529 "scan.l"
  1540. BEGIN(CCL); return CCE_SPACE;
  1541.     YY_BREAK
  1542. case 135:
  1543. YY_RULE_SETUP
  1544. #line 530 "scan.l"
  1545. BEGIN(CCL); return CCE_UPPER;
  1546.     YY_BREAK
  1547. case 136:
  1548. YY_RULE_SETUP
  1549. #line 531 "scan.l"
  1550. BEGIN(CCL); return CCE_XDIGIT;
  1551.     YY_BREAK
  1552. case 137:
  1553. YY_RULE_SETUP
  1554. #line 532 "scan.l"
  1555. {
  1556.             format_synerr(
  1557.                 _( "bad character class expression: %s" ),
  1558.                     yytext );
  1559.             BEGIN(CCL); return CCE_ALNUM;
  1560.             }
  1561.     YY_BREAK
  1562.  
  1563.  
  1564. case 138:
  1565. YY_RULE_SETUP
  1566. #line 541 "scan.l"
  1567. {
  1568.             yylval = myctoi( yytext );
  1569.             return NUMBER;
  1570.             }
  1571.     YY_BREAK
  1572. case 139:
  1573. YY_RULE_SETUP
  1574. #line 546 "scan.l"
  1575. return ',';
  1576.     YY_BREAK
  1577. case 140:
  1578. YY_RULE_SETUP
  1579. #line 547 "scan.l"
  1580. BEGIN(SECT2); return '}';
  1581.     YY_BREAK
  1582. case 141:
  1583. YY_RULE_SETUP
  1584. #line 549 "scan.l"
  1585. {
  1586.             synerr( _( "bad character inside {}'s" ) );
  1587.             BEGIN(SECT2);
  1588.             return '}';
  1589.             }
  1590.     YY_BREAK
  1591. case 142:
  1592. YY_RULE_SETUP
  1593. #line 555 "scan.l"
  1594. {
  1595.             synerr( _( "missing }" ) );
  1596.             BEGIN(SECT2);
  1597.             ++linenum;
  1598.             return '}';
  1599.             }
  1600.     YY_BREAK
  1601.  
  1602.  
  1603. case 143:
  1604. YY_RULE_SETUP
  1605. #line 565 "scan.l"
  1606. bracelevel = 0;
  1607.     YY_BREAK
  1608. case 144:
  1609. YY_RULE_SETUP
  1610. #line 567 "scan.l"
  1611. ACTION_ECHO; yy_push_state( COMMENT );
  1612.     YY_BREAK
  1613.  
  1614. case 145:
  1615. YY_RULE_SETUP
  1616. #line 570 "scan.l"
  1617. {
  1618.             ACTION_ECHO;
  1619.             CHECK_REJECT(yytext);
  1620.             }
  1621.     YY_BREAK
  1622. case 146:
  1623. YY_RULE_SETUP
  1624. #line 574 "scan.l"
  1625. {
  1626.             ACTION_ECHO;
  1627.             CHECK_YYMORE(yytext);
  1628.             }
  1629.     YY_BREAK
  1630.  
  1631. case 147:
  1632. YY_RULE_SETUP
  1633. #line 580 "scan.l"
  1634. ACTION_ECHO;
  1635.     YY_BREAK
  1636. case 148:
  1637. YY_RULE_SETUP
  1638. #line 581 "scan.l"
  1639. {
  1640.             ++linenum;
  1641.             ACTION_ECHO;
  1642.             if ( bracelevel == 0 ||
  1643.                  (doing_codeblock && indented_code) )
  1644.                 {
  1645.                 if ( doing_rule_action )
  1646.                     add_action( "\tYY_BREAK\n" );
  1647.  
  1648.                 doing_rule_action = doing_codeblock = false;
  1649.                 BEGIN(SECT2);
  1650.                 }
  1651.             }
  1652.     YY_BREAK
  1653.  
  1654. /* Reject and YYmore() are checked for above, in PERCENT_BRACE_ACTION */
  1655.  
  1656. case 149:
  1657. YY_RULE_SETUP
  1658. #line 599 "scan.l"
  1659. ACTION_ECHO; ++bracelevel;
  1660.     YY_BREAK
  1661. case 150:
  1662. YY_RULE_SETUP
  1663. #line 600 "scan.l"
  1664. ACTION_ECHO; --bracelevel;
  1665.     YY_BREAK
  1666. case 151:
  1667. YY_RULE_SETUP
  1668. #line 601 "scan.l"
  1669. ACTION_ECHO;
  1670.     YY_BREAK
  1671. case 152:
  1672. YY_RULE_SETUP
  1673. #line 602 "scan.l"
  1674. ACTION_ECHO;
  1675.     YY_BREAK
  1676. case 153:
  1677. YY_RULE_SETUP
  1678. #line 603 "scan.l"
  1679. ACTION_ECHO; /* character constant */
  1680.     YY_BREAK
  1681. case 154:
  1682. YY_RULE_SETUP
  1683. #line 604 "scan.l"
  1684. ACTION_ECHO; BEGIN(ACTION_STRING);
  1685.     YY_BREAK
  1686. case 155:
  1687. YY_RULE_SETUP
  1688. #line 605 "scan.l"
  1689. {
  1690.             ++linenum;
  1691.             ACTION_ECHO;
  1692.             if ( bracelevel == 0 )
  1693.                 {
  1694.                 if ( doing_rule_action )
  1695.                     add_action( "\tYY_BREAK\n" );
  1696.  
  1697.                 doing_rule_action = false;
  1698.                 BEGIN(SECT2);
  1699.                 }
  1700.             }
  1701.     YY_BREAK
  1702. case 156:
  1703. YY_RULE_SETUP
  1704. #line 617 "scan.l"
  1705. ACTION_ECHO;
  1706.     YY_BREAK
  1707.  
  1708.  
  1709. case 157:
  1710. YY_RULE_SETUP
  1711. #line 621 "scan.l"
  1712. ACTION_ECHO;
  1713.     YY_BREAK
  1714. case 158:
  1715. YY_RULE_SETUP
  1716. #line 622 "scan.l"
  1717. ACTION_ECHO;
  1718.     YY_BREAK
  1719. case 159:
  1720. YY_RULE_SETUP
  1721. #line 623 "scan.l"
  1722. ++linenum; ACTION_ECHO;
  1723.     YY_BREAK
  1724. case 160:
  1725. YY_RULE_SETUP
  1726. #line 624 "scan.l"
  1727. ACTION_ECHO; BEGIN(ACTION);
  1728.     YY_BREAK
  1729. case 161:
  1730. YY_RULE_SETUP
  1731. #line 625 "scan.l"
  1732. ACTION_ECHO;
  1733.     YY_BREAK
  1734.  
  1735. case YY_STATE_EOF(COMMENT):
  1736. case YY_STATE_EOF(ACTION):
  1737. case YY_STATE_EOF(ACTION_STRING):
  1738. #line 628 "scan.l"
  1739. {
  1740.             synerr( _( "EOF encountered inside an action" ) );
  1741.             yyterminate();
  1742.             }
  1743.     YY_BREAK
  1744. case 162:
  1745. YY_RULE_SETUP
  1746. #line 634 "scan.l"
  1747. {
  1748.             yylval = myesc( (Char *) yytext );
  1749.  
  1750.             if ( YY_START == FIRSTCCL )
  1751.                 BEGIN(CCL);
  1752.  
  1753.             return CHAR;
  1754.             }
  1755.     YY_BREAK
  1756.  
  1757. case 163:
  1758. YY_RULE_SETUP
  1759. #line 645 "scan.l"
  1760. ECHO;
  1761.     YY_BREAK
  1762. case YY_STATE_EOF(SECT3):
  1763. #line 646 "scan.l"
  1764. sectnum = 0; yyterminate();
  1765.     YY_BREAK
  1766.  
  1767. case 164:
  1768. YY_RULE_SETUP
  1769. #line 649 "scan.l"
  1770. format_synerr( _( "bad character: %s" ), yytext );
  1771.     YY_BREAK
  1772. case 165:
  1773. YY_RULE_SETUP
  1774. #line 651 "scan.l"
  1775. YY_FATAL_ERROR( "flex scanner jammed" );
  1776.     YY_BREAK
  1777. #line 2654 "scan.c"
  1778. case YY_STATE_EOF(INITIAL):
  1779. case YY_STATE_EOF(SECT2):
  1780. case YY_STATE_EOF(CODEBLOCK):
  1781. case YY_STATE_EOF(PICKUPDEF):
  1782. case YY_STATE_EOF(SC):
  1783. case YY_STATE_EOF(CARETISBOL):
  1784. case YY_STATE_EOF(NUM):
  1785. case YY_STATE_EOF(QUOTE):
  1786. case YY_STATE_EOF(FIRSTCCL):
  1787. case YY_STATE_EOF(CCL):
  1788. case YY_STATE_EOF(RECOVER):
  1789. case YY_STATE_EOF(PERCENT_BRACE_ACTION):
  1790. case YY_STATE_EOF(OPTION):
  1791. case YY_STATE_EOF(LINEDIR):
  1792.     yyterminate();
  1793.  
  1794.     case YY_END_OF_BUFFER: {
  1795.         // Amount of text matched not including the EOB char.
  1796.         int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
  1797.  
  1798.         // Undo the effects of YY_DO_BEFORE_ACTION.
  1799.         *yy_cp = yy_hold_char;
  1800.  
  1801.         if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) {
  1802.             /* We're scanning a new file or input source.  It's
  1803.              * possible that this happened because the user
  1804.              * just pointed yyin at a new source and called
  1805.              * yylex().  If so, then we have to assure
  1806.              * consistency between yy_current_buffer and our
  1807.              * globals.  Here is the right place to do so, because
  1808.              * this is the first action (other than possibly a
  1809.              * back-up) that will match for the new input source.
  1810.              */
  1811.             yy_n_chars = yy_current_buffer->yy_n_chars;
  1812.             yy_current_buffer->yy_input_file = yyin;
  1813.             yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
  1814.         }
  1815.  
  1816.         /* Note that here we test for yy_c_buf_p "<=" to the position
  1817.          * of the first EOB in the buffer, since yy_c_buf_p will
  1818.          * already have been incremented past the NUL character
  1819.          * (since all states make transitions on EOB to the
  1820.          * end-of-buffer state).  Contrast this with the test
  1821.          * in yyinput().
  1822.          */
  1823.         if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) {
  1824.             // This was really a NUL.
  1825.             yy_state_type yy_next_state;
  1826.  
  1827.             yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
  1828.  
  1829.             yy_current_state = yy_get_previous_state();
  1830.  
  1831.             /* Okay, we're now positioned to make the NUL
  1832.              * transition.  We couldn't have
  1833.              * yy_get_previous_state() go ahead and do it
  1834.              * for us because it doesn't know how to deal
  1835.              * with the possibility of jamming (and we don't
  1836.              * want to build jamming into it because then it
  1837.              * will run more slowly).
  1838.              */
  1839.  
  1840.             yy_next_state = yy_try_NUL_trans( yy_current_state );
  1841.  
  1842.             yy_bp = yytext_ptr + YY_MORE_ADJ;
  1843.  
  1844.             if ( yy_next_state ) {
  1845.                 /* Consume the NUL. */
  1846.                 yy_cp = ++yy_c_buf_p;
  1847.                 yy_current_state = yy_next_state;
  1848.                 goto yy_match;
  1849.             } else {
  1850.                 yy_cp = yy_c_buf_p;
  1851.                 goto yy_find_action;
  1852.             }
  1853.         } else
  1854.             switch ( yy_get_next_buffer() ) {
  1855.             case EOB_ACT_END_OF_FILE: {
  1856.                 yy_did_buffer_switch_on_eof = 0;
  1857.  
  1858.                 if ( yywrap() ) {
  1859.                     /* Note: because we've taken care in
  1860.                      * yy_get_next_buffer() to have set up
  1861.                      * yytext, we can now set up
  1862.                      * yy_c_buf_p so that if some total
  1863.                      * hoser (like flex itself) wants to
  1864.                      * call the scanner after we return the
  1865.                      * YY_NULL, it'll still work - another
  1866.                      * YY_NULL will get returned.
  1867.                      */
  1868.                     yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
  1869.  
  1870.                     yy_act = YY_STATE_EOF(YY_START);
  1871.                     goto do_action;
  1872.                 } else {
  1873.                     if ( ! yy_did_buffer_switch_on_eof )
  1874.                         YY_NEW_FILE;
  1875.                 }
  1876.                 break;
  1877.             }
  1878.  
  1879.             case EOB_ACT_CONTINUE_SCAN:
  1880.                 yy_c_buf_p =
  1881.                     yytext_ptr + yy_amount_of_matched_text;
  1882.  
  1883.                 yy_current_state = yy_get_previous_state();
  1884.  
  1885.                 yy_cp = yy_c_buf_p;
  1886.                 yy_bp = yytext_ptr + YY_MORE_ADJ;
  1887.                 goto yy_match;
  1888.  
  1889.             case EOB_ACT_LAST_MATCH:
  1890.                 yy_c_buf_p =
  1891.                 &yy_current_buffer->yy_ch_buf[yy_n_chars];
  1892.  
  1893.                 yy_current_state = yy_get_previous_state();
  1894.  
  1895.                 yy_cp = yy_c_buf_p;
  1896.                 yy_bp = yytext_ptr + YY_MORE_ADJ;
  1897.                 goto yy_find_action;
  1898.             }
  1899.         break;
  1900.     }
  1901.  
  1902.         default:
  1903.             YY_FATAL_ERROR(    "fatal flex scanner internal error--no action found" );
  1904.         } // end of action switch
  1905.     } // end of scanning one token
  1906. } // end of yylex
  1907.  
  1908.  
  1909.  
  1910.  
  1911. /* yy_get_next_buffer - try to read in a new buffer
  1912.  *
  1913.  * Returns a code representing an action:
  1914.  *    EOB_ACT_LAST_MATCH -
  1915.  *    EOB_ACT_CONTINUE_SCAN - continue scanning from current position
  1916.  *    EOB_ACT_END_OF_FILE - end of file
  1917.  */
  1918.  
  1919. YY_DECLARE(int) yy_get_next_buffer (void)
  1920. {
  1921.     register char* dest = yy_current_buffer->yy_ch_buf;
  1922.     register char* source = yytext_ptr;
  1923.     register int number_to_move, i;
  1924.     int ret_val;
  1925.  
  1926.     if (yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1])
  1927.         YY_FATAL_ERROR("fatal flex scanner internal error--end of buffer missed");
  1928.  
  1929.     if (yy_current_buffer->yy_fill_buffer == 0) {
  1930.         // Don't try to fill the buffer, so this is an EOF.
  1931.         if (yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1) {
  1932.             /* We matched a singled characater, the EOB, so
  1933.              * treat this as a final EOF.
  1934.              */
  1935.             return EOB_ACT_END_OF_FILE;
  1936.         }
  1937.  
  1938.         else {
  1939.             // We matched some text prior to the EOB, first process it.
  1940.             return EOB_ACT_LAST_MATCH;
  1941.         }
  1942.     }
  1943.  
  1944.     // Try to read more data.
  1945.  
  1946.     // First move last chars to start of buffer.
  1947.     number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
  1948.  
  1949.     for (i = 0; i < number_to_move; ++i)
  1950.         *(dest++) = *(source++);
  1951.  
  1952.     if (yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING)
  1953.         /* don't do the read, it's not guaranteed to return an EOF,
  1954.          * just force an EOF
  1955.          */
  1956.         yy_n_chars = 0;
  1957.     else {
  1958.         int num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1;
  1959.  
  1960.         while (num_to_read <= 0) {
  1961.             // Not enough room in the buffer - grow it.
  1962. #ifdef YY_USES_REJECT
  1963.             YY_FATAL_ERROR(
  1964.             "input buffer overflow, can't enlarge buffer because scanner uses REJECT");
  1965. #else
  1966.  
  1967.             // just a shorter name for the current buffer
  1968.             YY_BUFFER_STATE b = yy_current_buffer;
  1969.  
  1970.             int yy_c_buf_p_offset = (int) (yy_c_buf_p - b->yy_ch_buf);
  1971.  
  1972.             if (b->yy_is_our_buffer) {
  1973.                 int new_size = b->yy_buf_size * 2;
  1974.  
  1975.                 if (new_size <= 0)
  1976.                     b->yy_buf_size += b->yy_buf_size / 8;
  1977.                 else
  1978.                     b->yy_buf_size *= 2;
  1979.  
  1980.                 b->yy_ch_buf = (char*)
  1981.                     // Include room in for 2 EOB chars.
  1982.                     yy_flex_realloc((void*) b->yy_ch_buf, b->yy_buf_size + 2);
  1983.             } else
  1984.                 // Can't grow it, we don't own it.
  1985.                 b->yy_ch_buf = 0;
  1986.  
  1987.             if (!b->yy_ch_buf)
  1988.                 YY_FATAL_ERROR("fatal error - scanner input buffer overflow");
  1989.  
  1990.             yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
  1991.  
  1992.             num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1;
  1993. #endif
  1994.         }
  1995.  
  1996.         if (num_to_read > YY_READ_BUF_SIZE)
  1997.             num_to_read = YY_READ_BUF_SIZE;
  1998.  
  1999.         // Read in more data.
  2000.         YY_INPUT((&yy_current_buffer->yy_ch_buf[number_to_move]),
  2001.                     yy_n_chars, num_to_read);
  2002.     }
  2003.  
  2004.     if (yy_n_chars == 0) {
  2005.         if (number_to_move == YY_MORE_ADJ) {
  2006.             ret_val = EOB_ACT_END_OF_FILE;
  2007.             yyrestart(yyin);
  2008.         } else {
  2009.             ret_val = EOB_ACT_LAST_MATCH;
  2010.             yy_current_buffer->yy_buffer_status = YY_BUFFER_EOF_PENDING;
  2011.         }
  2012.     } else
  2013.         ret_val = EOB_ACT_CONTINUE_SCAN;
  2014.  
  2015.     yy_n_chars += number_to_move;
  2016.     yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
  2017.     yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
  2018.  
  2019.     yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
  2020.  
  2021.     return ret_val;
  2022. }
  2023.  
  2024.  
  2025. // yy_get_previous_state - get the state just before the EOB char was reached
  2026.  
  2027. YY_DECLARE(yy_state_type) yy_get_previous_state (void)
  2028. {
  2029.     register yy_state_type yy_current_state;
  2030.     register char* yy_cp;
  2031.  
  2032.     yy_current_state = yy_start;
  2033.     yy_current_state += YY_AT_BOL();
  2034.  
  2035.     for (yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp) {
  2036.         register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
  2037.         if ( yy_accept[yy_current_state] )
  2038.             {
  2039.             yy_last_accepting_state = yy_current_state;
  2040.             yy_last_accepting_cpos = yy_cp;
  2041.             }
  2042.         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  2043.             {
  2044.             yy_current_state = (int) yy_def[yy_current_state];
  2045.             if ( yy_current_state >= 726 )
  2046.                 yy_c = yy_meta[(unsigned int) yy_c];
  2047.             }
  2048.         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  2049.     }
  2050.  
  2051.     return yy_current_state;
  2052. }
  2053.  
  2054.  
  2055. /* yy_try_NUL_trans - try to make a transition on the NUL character
  2056.  *
  2057.  * synopsis
  2058.  *    next_state = yy_try_NUL_trans(current_state);
  2059.  */
  2060.  
  2061. YY_DECLARE(yy_state_type) yy_try_NUL_trans(yy_state_type yy_current_state)
  2062. {
  2063.     register int yy_is_jam;
  2064.     register char *yy_cp = yy_c_buf_p;
  2065.  
  2066.     register YY_CHAR yy_c = 1;
  2067.     if ( yy_accept[yy_current_state] )
  2068.         {
  2069.         yy_last_accepting_state = yy_current_state;
  2070.         yy_last_accepting_cpos = yy_cp;
  2071.         }
  2072.     while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  2073.         {
  2074.         yy_current_state = (int) yy_def[yy_current_state];
  2075.         if ( yy_current_state >= 726 )
  2076.             yy_c = yy_meta[(unsigned int) yy_c];
  2077.         }
  2078.     yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  2079.     yy_is_jam = (yy_current_state == 725);
  2080.  
  2081.     return yy_is_jam ? 0 : yy_current_state;
  2082. }
  2083.  
  2084.  
  2085. #ifndef YY_NO_UNPUT
  2086. YY_DECLARE(void) yyunput (int c, register char* yy_bp)
  2087. {
  2088.     register char* yy_cp = yy_c_buf_p;
  2089.  
  2090.     // undo effects of setting up yytext
  2091.     *yy_cp = yy_hold_char;
  2092.  
  2093.     if (yy_cp < yy_current_buffer->yy_ch_buf + 2) {
  2094.         // need to shift things up to make room
  2095.         // +2 for EOB chars.
  2096.         register int number_to_move = yy_n_chars + 2;
  2097.         register char *dest = &yy_current_buffer->yy_ch_buf[
  2098.                                     yy_current_buffer->yy_buf_size + 2];
  2099.         register char* source = &yy_current_buffer->yy_ch_buf[number_to_move];
  2100.  
  2101.         while (source > yy_current_buffer->yy_ch_buf)
  2102.             *--dest = *--source;
  2103.  
  2104.         yy_cp += (int) (dest - source);
  2105.         yy_bp += (int) (dest - source);
  2106.         yy_n_chars = yy_current_buffer->yy_buf_size;
  2107.  
  2108.         if (yy_cp < yy_current_buffer->yy_ch_buf + 2)
  2109.             YY_FATAL_ERROR("flex scanner push-back overflow");
  2110.     }
  2111.  
  2112.     *--yy_cp = (char) c;
  2113.  
  2114.  
  2115.     yytext_ptr = yy_bp;
  2116.     yy_hold_char = *yy_cp;
  2117.     yy_c_buf_p = yy_cp;
  2118. }
  2119. #endif    // ifndef YY_NO_UNPUT
  2120.  
  2121.  
  2122. YY_DECLARE(int) yyinput (void)
  2123. {
  2124.     int c;
  2125.  
  2126.     *yy_c_buf_p = yy_hold_char;
  2127.  
  2128.     if (*yy_c_buf_p == YY_END_OF_BUFFER_CHAR) {
  2129.         /* yy_c_buf_p now points to the character we want to return.
  2130.          * If this occurs *before* the EOB characters, then it's a
  2131.          * valid NUL; if not, then we've hit the end of the buffer.
  2132.          */
  2133.         if (yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars])
  2134.             *yy_c_buf_p = '\0';            // This was really a NUL.
  2135.         else { // need more input
  2136.             yytext_ptr = yy_c_buf_p;
  2137.             ++yy_c_buf_p;
  2138.  
  2139.             switch (yy_get_next_buffer()) {
  2140.                 case EOB_ACT_END_OF_FILE: {
  2141.                     if (yywrap()) {
  2142.                         yy_c_buf_p =
  2143.                         yytext_ptr + YY_MORE_ADJ;
  2144.                         return EOF;
  2145.                     }
  2146.  
  2147.                     if (!yy_did_buffer_switch_on_eof)
  2148.                         YY_NEW_FILE;
  2149.                     return yyinput();
  2150.                 }
  2151.  
  2152.                 case EOB_ACT_CONTINUE_SCAN:
  2153.                     yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
  2154.                     break;
  2155.  
  2156.                 case EOB_ACT_LAST_MATCH:
  2157.                     YY_FATAL_ERROR("unexpected last match in yyinput()");
  2158.             }
  2159.         }
  2160.     }
  2161.  
  2162.     c = *(unsigned char*) yy_c_buf_p;    // cast for 8-bit char's
  2163.     *yy_c_buf_p = '\0';                    // preserve yytext
  2164.     yy_hold_char = *++yy_c_buf_p;
  2165.  
  2166.     yy_current_buffer->yy_at_bol = (c == '\n');
  2167.  
  2168.     return c;
  2169. }
  2170.  
  2171.  
  2172. YY_DECLARE(void) yyrestart (istream* input_file)
  2173. {
  2174.     if ( ! yy_current_buffer )
  2175.         yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
  2176.  
  2177.     yy_init_buffer( yy_current_buffer, input_file );
  2178.     yy_load_buffer_state();
  2179. }
  2180.  
  2181.  
  2182. YY_DECLARE(void) yy_switch_to_buffer (YY_BUFFER_STATE new_buffer)
  2183. {
  2184.     if (yy_current_buffer == new_buffer)
  2185.         return;
  2186.  
  2187.     if (yy_current_buffer) {    // Flush out information for old buffer.
  2188.         *yy_c_buf_p = yy_hold_char;
  2189.         yy_current_buffer->yy_buf_pos = yy_c_buf_p;
  2190.         yy_current_buffer->yy_n_chars = yy_n_chars;
  2191.     }
  2192.  
  2193.     yy_current_buffer = new_buffer;
  2194.     yy_load_buffer_state();
  2195.  
  2196.     /* We don't actually know whether we did this switch during
  2197.      * EOF (yywrap()) processing, but the only time this flag
  2198.      * is looked at is after yywrap() is called, so it's safe
  2199.      * to go ahead and always set it.
  2200.      */
  2201.     yy_did_buffer_switch_on_eof = 1;
  2202. }
  2203.  
  2204.  
  2205. YY_DECLARE(void) yy_load_buffer_state (void)
  2206. {
  2207.     yy_n_chars = yy_current_buffer->yy_n_chars;
  2208.     yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
  2209.     yyin = yy_current_buffer->yy_input_file;
  2210.     yy_hold_char = *yy_c_buf_p;
  2211. }
  2212.  
  2213.  
  2214. YY_DECLARE(YY_BUFFER_STATE) yy_create_buffer (istream* file, int size)
  2215. {
  2216.     YY_BUFFER_STATE b;
  2217.  
  2218.     b = (YY_BUFFER_STATE) yy_flex_alloc(sizeof(struct yy_buffer_state));
  2219.     if (!b)
  2220.         YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()");
  2221.  
  2222.     b->yy_buf_size = size;
  2223.  
  2224.     /* yy_ch_buf has to be 2 characters longer than the size given because
  2225.      * we need to put in 2 end-of-buffer characters.
  2226.      */
  2227.     b->yy_ch_buf = (char*) yy_flex_alloc(b->yy_buf_size + 2);
  2228.     if (!b->yy_ch_buf)
  2229.         YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()");
  2230.  
  2231.     b->yy_is_our_buffer = 1;
  2232.  
  2233.     yy_init_buffer(b, file);
  2234.  
  2235.     return b;
  2236. }
  2237.  
  2238.  
  2239. YY_DECLARE(void) yy_delete_buffer (YY_BUFFER_STATE b)
  2240. {
  2241.     if (!b)
  2242.         return;
  2243.  
  2244.     if (b == yy_current_buffer)
  2245.         yy_current_buffer = (YY_BUFFER_STATE) 0;
  2246.  
  2247.     if (b->yy_is_our_buffer)
  2248.         yy_flex_free((void*) b->yy_ch_buf);
  2249.  
  2250.     yy_flex_free((void*) b);
  2251. }
  2252.  
  2253.  
  2254. #if !defined(YY_ALWAYS_INTERACTIVE) && !defined(YY_NEVER_INTERACTIVE)
  2255. extern YY_C int isatty (int);
  2256. #endif
  2257.  
  2258.  
  2259. YY_DECLARE(void) yy_init_buffer (YY_BUFFER_STATE b, istream* file)
  2260. {
  2261.     yy_flush_buffer(b);
  2262.  
  2263.     b->yy_input_file  = file;
  2264.     b->yy_fill_buffer = 1;
  2265.  
  2266. #if YY_ALWAYS_INTERACTIVE
  2267.     b->yy_is_interactive = 1;
  2268. #elif YY_NEVER_INTERACTIVE
  2269.     b->yy_is_interactive = 0;
  2270. #else
  2271.     b->yy_is_interactive = file ? (isatty(fileno(file)) > 0) : 0;
  2272. #endif
  2273. }
  2274.  
  2275.  
  2276. YY_DECLARE(void) yy_flush_buffer (YY_BUFFER_STATE b)
  2277. {
  2278.     b->yy_n_chars = 0;
  2279.  
  2280.     /* We always need two end-of-buffer characters.  The first causes
  2281.      * a transition to the end-of-buffer state.  The second causes
  2282.      * a jam in that state.
  2283.      */
  2284.     b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
  2285.     b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
  2286.  
  2287.     b->yy_buf_pos = &b->yy_ch_buf[0];
  2288.  
  2289.     b->yy_at_bol = 1;
  2290.     b->yy_buffer_status = YY_BUFFER_NEW;
  2291.  
  2292.     if (b == yy_current_buffer)
  2293.         yy_load_buffer_state();
  2294. }
  2295.  
  2296.  
  2297. #ifndef YY_NO_SCAN_BUFFER
  2298. YY_BUFFER_STATE yy_scan_buffer (char* base, yy_size_t size)
  2299. {
  2300.     YY_BUFFER_STATE b;
  2301.  
  2302.     if (size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR ||
  2303.                     base[size-1] != YY_END_OF_BUFFER_CHAR)
  2304.         return 0;        // They forgot to leave room for the EOB's.
  2305.  
  2306.     b = (YY_BUFFER_STATE) yy_flex_alloc(sizeof(struct yy_buffer_state));
  2307.     if (!b)
  2308.         YY_FATAL_ERROR("out of dynamic memory in yy_scan_buffer()");
  2309.  
  2310.     b->yy_buf_size       = size - 2;    // "- 2" to take care of EOB's
  2311.     b->yy_buf_pos        = b->yy_ch_buf = base;
  2312.     b->yy_is_our_buffer  = 0;
  2313.     b->yy_input_file     = 0;
  2314.     b->yy_n_chars        = b->yy_buf_size;
  2315.     b->yy_is_interactive = 0;
  2316.     b->yy_at_bol         = 1;
  2317.     b->yy_fill_buffer    = 0;
  2318.     b->yy_buffer_status  = YY_BUFFER_NEW;
  2319.  
  2320.     yy_switch_to_buffer(b);
  2321.  
  2322.     return b;
  2323. }
  2324. #endif
  2325.  
  2326.  
  2327. #ifndef YY_NO_SCAN_STRING
  2328. YY_BUFFER_STATE yy_scan_string (yyconst char* str)
  2329. {
  2330.     int len;
  2331.     for (len = 0; str[len]; ++len)
  2332.         ;
  2333.  
  2334.     return yy_scan_bytes(str, len);
  2335. }
  2336. #endif
  2337.  
  2338.  
  2339. #ifndef YY_NO_SCAN_BYTES
  2340. YY_BUFFER_STATE yy_scan_bytes (yyconst char* bytes, int len)
  2341. {
  2342.     YY_BUFFER_STATE b;
  2343.     char* buf;
  2344.     yy_size_t n;
  2345.     int i;
  2346.  
  2347.     // Get memory for full buffer, including space for trailing EOB's.
  2348.     n = len + 2;
  2349.     buf = (char*) yy_flex_alloc(n);
  2350.     if (!buf)
  2351.         YY_FATAL_ERROR("out of dynamic memory in yy_scan_bytes()");
  2352.  
  2353.     for (i = 0; i < len; ++i)
  2354.         buf[i] = bytes[i];
  2355.  
  2356.     buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
  2357.  
  2358.     b = yy_scan_buffer(buf, n);
  2359.     if (!b)
  2360.         YY_FATAL_ERROR("bad buffer in yy_scan_bytes()");
  2361.  
  2362.     /* It's okay to grow etc. this buffer, and we should throw it
  2363.      * away when we're done.
  2364.      */
  2365.     b->yy_is_our_buffer = 1;
  2366.  
  2367.     return b;
  2368. }
  2369. #endif
  2370.  
  2371.  
  2372. #ifndef YY_NO_PUSH_STATE
  2373. YY_DECLARE(void) yy_push_state (int new_state)
  2374. {
  2375.     if (yy_start_stack_ptr >= yy_start_stack_depth) {
  2376.         yy_size_t new_size;
  2377.  
  2378.         yy_start_stack_depth += YY_START_STACK_INCR;
  2379.         new_size = yy_start_stack_depth * sizeof(int);
  2380.  
  2381.         if (!yy_start_stack)
  2382.             yy_start_stack = (int*) yy_flex_alloc(new_size);
  2383.  
  2384.         else
  2385.             yy_start_stack = (int*) yy_flex_realloc((void*) yy_start_stack, new_size);
  2386.  
  2387.         if (!yy_start_stack)
  2388.             YY_FATAL_ERROR("out of memory expanding start-condition stack");
  2389.     }
  2390.  
  2391.     yy_start_stack[yy_start_stack_ptr++] = YY_START;
  2392.  
  2393.     BEGIN(new_state);
  2394. }
  2395. #endif
  2396.  
  2397.  
  2398. #ifndef YY_NO_POP_STATE
  2399. YY_DECLARE(void) yy_pop_state (void)
  2400. {
  2401.     if (--yy_start_stack_ptr < 0)
  2402.         YY_FATAL_ERROR("start-condition stack underflow");
  2403.  
  2404.     BEGIN(yy_start_stack[yy_start_stack_ptr]);
  2405. }
  2406. #endif
  2407.  
  2408.  
  2409. #ifndef YY_NO_TOP_STATE
  2410. YY_DECLARE(int) yy_top_state (void)
  2411. {
  2412.     return yy_start_stack[yy_start_stack_ptr - 1];
  2413. }
  2414. #endif
  2415.  
  2416. #ifndef YY_EXIT_FAILURE
  2417. #define YY_EXIT_FAILURE 2
  2418. #endif
  2419.  
  2420.  
  2421. YY_DECLARE(void) YY_FATAL_ERROR (yyconst char msg[])
  2422. {
  2423.     (void) fprintf(stderr, "%s\n", msg);
  2424.     exit(YY_EXIT_FAILURE);
  2425. }
  2426.  
  2427.  
  2428. // Redefine yyless() so it works in section 3 code.
  2429.  
  2430. #undef yyless
  2431. #define yyless(n)    do { \
  2432.         /* Undo effects of setting up yytext. */ \
  2433.         yytext[yyleng] = yy_hold_char; \
  2434.         yy_c_buf_p = yytext + n - YY_MORE_ADJ; \
  2435.         yy_hold_char = *yy_c_buf_p; \
  2436.         *yy_c_buf_p = '\0'; \
  2437.         yyleng = n; \
  2438.     } while (0)
  2439.  
  2440.  
  2441. // Internal utility routines.
  2442.  
  2443. #ifndef yytext_ptr
  2444. static void
  2445. yy_flex_strncpy (char* s1, yyconst char* s2, int n)
  2446. {
  2447.     register int i;
  2448.     for (i = 0; i < n; ++i)
  2449.         s1[i] = s2[i];
  2450. }
  2451. #endif
  2452.  
  2453.  
  2454. static void*
  2455. yy_flex_alloc (yy_size_t size)
  2456. {
  2457.     return (void*) malloc(size);
  2458. }
  2459.  
  2460. static void*
  2461. yy_flex_realloc (void* ptr, yy_size_t size)
  2462. {
  2463.     return (void*) realloc(ptr, size);
  2464. }
  2465.  
  2466. static void
  2467. yy_flex_free (void* ptr)
  2468. {
  2469.     free(ptr);
  2470. }
  2471.  
  2472. #if YY_MAIN
  2473. int
  2474. main (void)
  2475. {
  2476.     yylex();
  2477.     return 0;
  2478. }
  2479. #endif
  2480. #line 651 "scan.l"
  2481.  
  2482.  
  2483.  
  2484. int yywrap()
  2485.     {
  2486.     if ( --num_input_files > 0 )
  2487.         {
  2488.         set_input_file( *++input_files );
  2489.         return 0;
  2490.         }
  2491.  
  2492.     else
  2493.         return 1;
  2494.     }
  2495.  
  2496.  
  2497. /* set_input_file - open the given file (if NULL, stdin) for scanning */
  2498.  
  2499. void set_input_file( char *file )
  2500.     {
  2501.     if ( file && strcmp( file, "-" ) )
  2502.         {
  2503.         infilename = copy_string( file );
  2504.         yyin = fopen( infilename, "r" );
  2505.  
  2506.         if ( yyin == NULL )
  2507.             lerrsf( _( "can't open %s" ), file );
  2508.         }
  2509.  
  2510.     else
  2511.         {
  2512.         yyin = stdin;
  2513.         infilename = copy_string( "<stdin>" );
  2514.         }
  2515.  
  2516.     linenum = 1;
  2517.     }
  2518.  
  2519.  
  2520. /* Wrapper routines for accessing the scanner's malloc routines. */
  2521.  
  2522. void *flex_alloc( size_t size )
  2523.     {
  2524.     SpinCursor(32);
  2525.     return (void *) malloc( size );
  2526.     }
  2527.  
  2528. void *flex_realloc( void *ptr, size_t size )
  2529.     {
  2530.     SpinCursor(32);
  2531.     return (void *) realloc( ptr, size );
  2532.     }
  2533.  
  2534. void flex_free( void *ptr )
  2535.     {
  2536.     SpinCursor(32);
  2537.     if ( ptr )
  2538.         free( ptr );
  2539.     }
  2540.